package com.onlineMIS.ORM.DAO.headQ.finance;

import java.util.List;

import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Restrictions;
import org.springframework.stereotype.Repository;

import com.onlineMIS.ORM.DAO.BaseDAO;
import com.onlineMIS.ORM.entity.headQ.finance.FinanceBillItem;
import com.onlineMIS.ORM.entity.headQ.supplier.finance.FinanceBillSupplier;
import com.onlineMIS.ORM.entity.headQ.supplier.finance.FinanceBillSupplierItem;

@Repository
public class FbSupplierItemDaoImpl extends BaseDAO<FinanceBillSupplierItem>{

	public List<FinanceBillSupplierItem> getAllByCardId(int cardId, boolean b) {
		DetachedCriteria criteria = DetachedCriteria.forClass(FinanceBillSupplierItem.class);
		criteria.add(Restrictions.eq("financeCategory.id", cardId));
		List<FinanceBillSupplierItem> fBillItems =  getByCritera(criteria, true);
		return fBillItems;
	}

	
}
